

require "Task/DailyTask/DailyTaskBase"

QNW_TS_Salad = QNW_TS_DailyTaskBase:derive("QNW_TS_Salad")

local this = QNW_TS_Salad
this.name = getText("IGUI_CatchMeee_TaskSystem_Task_BaiNian_Name")
this.desc = getText("IGUI_CatchMeee_TaskSystem_Task_BaiNian_Desc")

function QNW_TS_Salad:new()
    local o = QNW_TS_DailyTaskBase:new()
    setmetatable(o, self)
    self.__index = self

    o.maxCount = 1

    return o
end

function QNW_TS_Salad:initReward()
    local player = getPlayer()
    local level1 = player:getPerkLevel(Perks.Cooking)
    if level1 == 10 then
        --processGeneralMessage(getText("IGUI_BaiNian2"))
        QNW_TS_ClientCommand.randomReward(self, "low", 1)
        --player:getInventory():AddItems("Base.HongBao",1)
    else  
            --processGeneralMessage(getText("IGUI_BaiNian2"))
            QNW_TS_ClientCommand.randomReward(self, "low", 1)
            --player:getInventory():AddItems("Base.HongBao",1)
    end
end